import React from 'react';
import { Table } from 'antd';
class name extends React.Component {
  getRowClassName = (record, index) => {
    let className = index % 2 == 0 ? 'oldRowStyle' : 'eventRowStyle';
    return className;
  };
  render() {
    let { tableColumns, tableData, top, bottom, isSelect } = this.props;
    return (
      <div>
        <Table
          pagination={{ position: [top, bottom] }}
          columns={tableColumns}
          dataSource={tableData && tableData.length > 0 ? tableData : null}
          rowSelection={isSelect ? { type: 'checkbox' } : null}
          rowClassName={this.getRowClassName}
        />
      </div>
    );
  }
}
export default name;
